package com.adou.d8.thread;

/**
 * 1.继承Thread线程类
 */
public class MyThread extends Thread{

    /**
     * 2.实现run方法
     */
    @Override
    public void run() {
        Thread t = Thread.currentThread();

        for (int i = 0; i < 5; i++) {
            System.out.println(t.getName() + "子线程 MyThread 线程输出 " + i);

        }
    }
}

